namespace Mitek.Repositories.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class InitialCreate : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.MitekDatas",
                c => new
                    {
                        ID = c.Int(nullable: false, identity: true),
                        M1 = c.String(),
                        M2 = c.String(),
                        M3 = c.String(),
                        M4 = c.String(),
                        M5 = c.String(),
                        M6 = c.String(),
                        M7 = c.String(),
                        M8 = c.String(),
                        M9 = c.String(),
                        M10 = c.String(),
                        M11 = c.String(),
                        M12 = c.String(),
                        M13 = c.String(),
                        M14 = c.String(),
                        CreateUserID = c.Int(nullable: false),
                        IsDeleted = c.Boolean(nullable: false),
                        CreatedTime = c.DateTime(nullable: false),
                        ModifiedTime = c.DateTime(nullable: false),
                    })
                .PrimaryKey(t => t.ID);
            
            CreateTable(
                "dbo.UserRoles",
                c => new
                    {
                        ID = c.Int(nullable: false, identity: true),
                        RoleID = c.Int(nullable: false),
                        Name = c.String(),
                        Desc = c.String(),
                        CreatedTime = c.DateTime(nullable: false),
                        ModifiedTime = c.DateTime(nullable: false),
                    })
                .PrimaryKey(t => t.ID);
            
            CreateTable(
                "dbo.Users",
                c => new
                    {
                        ID = c.Int(nullable: false, identity: true),
                        UserName = c.String(nullable: false, maxLength: 32),
                        PassWord = c.String(nullable: false, maxLength: 32),
                        Name = c.String(nullable: false, maxLength: 32),
                        Province = c.Int(nullable: false),
                        City = c.Int(nullable: false),
                        Hospital = c.Int(nullable: false),
                        Deparment = c.String(),
                        DoctorOffice = c.String(),
                        Mobile = c.String(nullable: false),
                        DoctorCertificate = c.String(),
                        RoleID = c.Int(nullable: false),
                        Domain = c.String(),
                        Status = c.Int(nullable: false),
                        IsDeleted = c.Boolean(nullable: false),
                        CreatedTime = c.DateTime(nullable: false),
                        ModifiedTime = c.DateTime(nullable: false),
                    })
                .PrimaryKey(t => t.ID);
            
        }
        
        public override void Down()
        {
            DropTable("dbo.Users");
            DropTable("dbo.UserRoles");
            DropTable("dbo.MitekDatas");
        }
    }
}
